package site.dao;

import java.sql.Connection;
import java.sql.SQLException;

import neoutil.CommonDao;
import site.entity.Review;

public class ReviewDAO extends CommonDao<Review, Long> {
	public ReviewDAO(Connection connection) {
		super(Review.class, connection);
	}

	public void save(Review review) throws SQLException {
		Object[] params = { review.getAdvice(),review.getResourceid(),
				review.getReviewerid(),review.getReviewername(),review.getStatus()};
		execute(SQLString.SQL_REVIEW_INSERT, params);
	}

	public void delete(Review review) throws SQLException {
		Object[] params = { review.getId()};
		execute(SQLString.SQL_REVIEW_DELETE, params);
		
	}
}
